\documentclass{article}

\usepackage{listings}
\usepackage{color}
\usepackage{graphicx}
\usepackage{float}
\usepackage{amsmath}
\usepackage{subfig}
\usepackage{cite}
\usepackage{url}
\usepackage{amsmath}
\usepackage{enumerate}

\begin{document}

\title{Distributed System - Google Cloud Service}

\author{Andon Tchechmedjiev, 
\and Jander Nascimento}

\maketitle

\section{Prototype}

The \emph{Shortie} is the name of the project to validate the Google Cloud Service as a cloud service.
\emph{Shortie} is a twitter-like application for posting messages, but with no characters limitation. It uses a simple authentication service for Authentication and a data storage service, that is already provided by Google App Engine.

\section{Specification}

The application will use a couple API's, already provided by google, to implement the basic functionalities required by the application. 

\begin{enumerate}
\item Java Servlet API
\item Java Data Object / Data Persistence	
\item Google APP Engine for Java
\end{enumerate}


A scalable data store is also provided for free use. Two options of data store implementations are offered, each of them are different in the availability and consistency schema, those service specification are JDO(Java Data Object) or JPA(Java Persistent API), implemented by DataNucleus Access Platform - implementation of these two standards.

Along with the persistent API Google App Engine offers a cache for the Queries performed and the calculations, which are: MemCache engine. The specification is in the JSR 107 (JCache).

Two other services are offered: Mail and Image services. Mail that implements Java Mail Service specifications for dealing with e-mails. The Image allow the user to manipulate images performing several operations like cropping, scale, rotating and color enhancements.

\section{Google Cloud service}

Google Cloud service for Java runs on the version 6, but has support for versions 5. 

The Google Cloud APP automatically provides the Java Servlet API support. The only requirement is that the application application have a deployment descriptor properly written. 

The JVM runs on a secure sandbox environment assuring that one running application do not interfere in another application performance.

\subsection{Account Creation}

For the account creation the requirements are: a google account (gmail for instance) and a telephone number for the Google App engine validation.

After the account have been created is possible to check the following informations:
\begin{enumerate}
\item CPU Time
\item Bandwidth usage
\end{enumerate}

Those informations are available only if you have a properly deployed application.

\subsection{Google Plugin}

Google Plugin for Eclipse is an extension for eclipse that adds to it the google project wizard creation and debug configuration for Google App Engine project.

Google Plugin allows to deploy your application easily into Google App Engine, directly from Eclipse.

After installing Google Plugin for Eclipse (see \url{http://code.google.com/appengine/docs/java/tools/eclipse.html}), you can use the option \emph{File / New / Google / Web Application Project} to create the basic project infra structure.

\subsection{Deployment}

The deployment can be done in two different ways:

\begin{itemize}
\item Using Google Plugin for eclipse
\item Using Google App Engine SDK
\end{itemize}

The upload with Google Plugin is quite simple, after a create a project as a Google Web Application Project access the context menu of the project and look for the option \emph{Google}, and then activate the \emph{Deploy to App Engine}. To the application deployment is done is necessary to specify the App ID and the password for the registered account.

The other way to upload the application is using the \emph{appcfg.sh} (for linux) or \emph{appcfg.cmd} (for windows), both of then are present in the AppEngine SDK. 

The general usage to upload the application using \emph{appcfg}  scripts is \emph{appcfg.sh update war}, where the \emph{war} is the path to the web archive for the java application.

\subsection{Restriction}

The Google App Engine is free, as long as you don't need more than 500 Mb of storage and the page views are not mode than 5 millions per month.

\subsection{How to test Shortie}

\emph{Shortie} application can be reached through the address \url{http://voodleclass.appspot.com/}, give it a try.

\end{document}


